<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2" />
    <g:set var="entityName" value="${message(code: 'leadTeam.label', default: 'leadTeam')}" />
    <title>团队的线索</title>
</head>

<body>
    <div class="main-body">
        <div class="page-wrapper">
            <!-- Page-header start -->
            <div class="page-header">
                <div class="page-header-title">
                    <h4>团队的线索</h4>
                </div>
                <div class="page-header-breadcrumb">
                    <ul class="breadcrumb-title">
                        <li class="breadcrumb-item">
                            <a href="/salesDashboard/index">
                                <i class="icofont icofont-home"></i>
                            </a>
                        </li>
                        <li class="breadcrumb-item"><a href="#!">团队的线索</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="page-body">
                <div class="card">
                    <div class="card-header">
                        <h5>团队的线索</h5>
                        <div class="card-header-right">
                            %{-- <i class="icofont icofont-rounded-down"></i> --}%
                            %{-- <g:link action="create"><i class="ion-plus"></i> 新增</g:link> --}%
                        </div>
                    </div>

                    <div class="card-block dt-responsive">
                        <div class="table-responsive">
                            <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">

                                <g:form method="POST" action="searchLeadTeam">
                                    <div class="row m-0">
                                        <div class="col-md-8 p-l-0">
                                            <div id="order-table_filter" class="dataTables_filter text-left">
                                                <label>搜索
                                                    <input type="text" class="form-control" placeholder="所有人" name="ownerFullName" id="ownerFullName" value="${params?.ownerFullName}">
                                                    <input type="text" class="form-control" placeholder="公司" name="company" id="company" value="${params?.company}">
                                                </label>
                                            </div>
                                        </div>
                                        <div class="col-md-4 p-r-0 dt-buttons text-right">
                                            <button class="btn btn-inverse btn-sm btn-squeare" type="submit"><i class="fa fa-search"></i></button>
                                            <button class="btn btn-inverse btn-sm btn-squeare" type="button" id="resetBtn"><i class="fa fa-refresh"></i></button>
                                        </div>
                                    </div>
                                </g:form>
%{--
                                <g:form method="POST" action="exportLeadTeam">
                                    <div class="row m-0">
                                        <input type="hidden" class="form-control" placeholder="所有人" name="ownerFullName" id="exportOwnerFullName" value="${params?.ownerFullName}">
                                        <input type="hidden" class="form-control" placeholder="公司" name="company" id="exportCompany" value="${params?.company}">
                                        <input type="hidden" class="form-control" placeholder="文件类型" name="f" value="excel">
                                        <input type="hidden" class="form-control" placeholder="后缀" name="extension" value="xls">
                                        <div class="col-md-12 p-r-0 dt-buttons text-right">
                                            <button class="btn btn-success btn-mini" type="submit"><i class="icofont icofont-search"></i>导出
                                            </button>
                                        </div>
                                    </div>
                                </g:form>
 --}%
                                <table class="table table-striped  table-bordered table-hover">
                                    <thead>
                                        <tr>
                                            <g:sortableColumn property="company" title="线索" />
                                            <g:sortableColumn property="fullName" title="所有人" />
                                            <g:sortableColumn property="industry" title="行业" />
                                            <g:sortableColumn property="status" title="状态" />
                                            <g:sortableColumn property="createBy" title="创建人" />
                                            <g:sortableColumn property="modifyBy" title="修改人" />
                                            <g:sortableColumn property="createdDate" title="创建时间" />
                                            <g:sortableColumn property="modifiedDate" title="修改时间" />
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <g:each in="${leadTeamList}">
                                            <tr>
                                                <td>
                                                    <g:link controller="lead" action="show" id="${it?.lead?.id}">${it?.lead}</g:link>
                                                </td>
                                                <td>${it?.lead.user}</td>
                                                <td>${it?.lead.industry}</td>
                                                <td>${it?.lead.status}</td>
                                                <td>${it.createBy}</td>
                                                <td>${it.modifyBy}</td>
                                                <td>
                                                    <g:formatDate date="${it?.createdDate}" format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                                                </td>
                                                <td>
                                                    <g:formatDate date="${it?.modifiedDate}" format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                                                </td>
                                            </tr>
                                        </g:each>
                                    </tbody>
                                </table>

                                <div class="dataTables_paginate">
                                    <div class="pagination">
                                        <g:paginate total="${leadTeamCount ?: 0}" params="${params}" />
                                    </div>
                                </div>
                            </div>

                        </div>

                    </div>
                </div>
                <!-- Hover table card end -->
            </div>

            <!-- Page-body end -->
        </div>
    </div>

    <g:javascript>
        $(function() {
        $("#resetBtn").click(function() {
        $("#ownerFullName").val("");
        $("#company").val("");
    })
});
    </g:javascript>

</body>

</html>
